package com.ikun.service;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;
import java.util.Map;

import com.ikun.entity.Attendances;
import com.ikun.entity.Properties;
import com.ikun.entity.Users;
import com.ikun.util.Result;

public interface ProperManagementService {
    List<Properties> findAll();

    List<Properties> findByBuildingidAndStatus(Integer buildingId);

    List<Properties> findAllByManagementId(String ownerId);

    List<Users> findAllOwner();

    String addOwner(Users users, String propertyId);

    Result clock_in(Integer staffId, LocalTime currentTime);

    Result clock_out(Integer staffId, LocalTime currentTime);

    Result insertStatus(Integer staffId, LocalDate recordDate, Integer status);

    // 根据员工ID和日期范围查询考勤记录
    Result<List<Attendances>> getAttendanceRecords(Map<String, Object> params);

    /**
     * 通过ID查询单条数据
     *
     * @param attendanceId 主键
     * @return 实例对象
     */
    Attendances queryById(Integer attendanceId);

    /**
     * 新增数据
     *
     * @param attendances 实例对象
     * @return 实例对象
     */
    Attendances insert(Attendances attendances);

    /**
     * 修改数据
     *
     * @param attendances 实例对象
     * @return 实例对象
     */
    Attendances update(Attendances attendances);

    /**
     * 通过主键删除数据
     *
     * @param attendanceId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer attendanceId);

    int calculateAttendanceDays(String formattedYearMonth, String manageId);

    List<Attendances> findAllStuffAttendances(String datePart, String namePart);

    List<Attendances> getAllAttendance(Integer staffId);

}
